package com.asia5b.a5mall.member.activity

import android.os.Bundle
import androidx.fragment.app.Fragment
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.asia5b.a5bmall.resource.ActCons
import com.asia5b.a5mall.member.R
import com.asia5b.a5mall.member.databinding.ActivityCollectBinding
import com.asia5b.a5mall.member.fragment.CollectFragment
import com.asia5b.a5mall.middleware.base.SimpleActivity
import com.asia5b.a5mall.middleware.base.SimpleViewModel

/**
 * Created by zhangyuncai on 2019/12/21.
 * @Note   会员收藏页面
 */
@Route(path = ActCons.CollectActivity)
class CollectActivity: SimpleActivity<SimpleViewModel, ActivityCollectBinding>() {
    override val viewModelClazz: Class<SimpleViewModel>
        get() = SimpleViewModel::class.java

    override fun getDataBinding(): ActivityCollectBinding {
        return ActivityCollectBinding.inflate(layoutInflater)
    }
    override var sIsDark = true
    @Autowired(name = "type",required = true)
    @JvmField var type :Int = 0//  0/1 商品/店铺

    override fun initView() {
        val bundle=Bundle()
        type=intent.getIntExtra("type",0)
        bundle.putInt("type",type)
        val fragment = Fragment.instantiate(mActivity, CollectFragment::class.java.name, bundle)
        supportFragmentManager.beginTransaction()
                .add(R.id.fl_collect_container,fragment)
                .commit()
    }

    override fun initEvent() {
    }

    override fun initData() {
    }


}